package edu.ccut.saturn.studio.dialog.validatedialog;

import org.eclipse.jface.viewers.ILabelProviderListener;
import org.eclipse.jface.viewers.ITableLabelProvider;
import org.eclipse.swt.graphics.Image;

import edu.ccut.saturn.studio.logic.model.saturn.SaturnValidate;

public class ValidateLabelProvider implements ITableLabelProvider {
	
	public Image getColumnImage(Object arg0, int arg1) {
		return null;
	}

	public String getColumnText(Object arg0, int columnIndex) {
		SaturnValidate vali = (SaturnValidate)arg0;
		if (columnIndex == 0){
			return vali.getId();
		}
		if (columnIndex == 1) {
			return vali.getKey();
		}
		if (columnIndex == 2) {
			return vali.getName();
		}
		if (columnIndex == 3) {
			return vali.getValidateClass();
		}
		if (columnIndex == 4) {
			return vali.getJsMethodName();
		}
		if (columnIndex == 5) {
			return vali.getCustomJsMethod();
		}
		if (columnIndex == 6) {
			return vali.getEventInfos().toString();
		}
		if (columnIndex == 7) {
			return vali.getDescription();
		}
		return "";
	}

	public void addListener(ILabelProviderListener arg0) {
	}

	public void dispose() {
	}

	public boolean isLabelProperty(Object arg0, String arg1) {
		return false;
	}

	public void removeListener(ILabelProviderListener arg0) {
	}
}
